import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Table from './views/nav1/Table.vue'
import echarts from './views/charts/echarts.vue'
//=============组织机构=================//
import Department from './views/org/department.vue'
import Employee from "./views/org/employee";
//=============组织机构=================//
//==============系统管理================//
import Config from "./views/sysmanage/config";
import Dictionary from "./views/sysmanage/dictionary";
import DictionaryItem from "./views/sysmanage/dictionaryItem";
//==============系统管理================//
//==============产品管理================//
import ProductType from './views/prod/productType.vue'
import Product from './views/prod/product.vue'
//==============产品管理================//
//==============营销管理================//
import Activity from './views/market/activity.vue'
import ActivityRemark from './views/market/activityRemark.vue'
import Clue from './views/market/clue.vue'
import ClueRemark from './views/market/clueRemark.vue'
import Business from './views/market/business.vue'
//==============产品管理================//
//==============订单模块================//
import Order from './views/order/order.vue'
import Contract from './views/order/contract.vue'
import OrderProduct from './views/order/orderProduct.vue'
//==============订单模块================//
//==============售后管理================//
import Customer from './views/afterMarket/customer.vue'
import Guarantee from './views/afterMarket/guarantee.vue'
import GuaranteeItem from './views/afterMarket/guaranteeItem.vue'
//==============售后管理================//

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '主页',
        iconCls: 'fa fa-bar-chart',
        leaf:true, //没有儿子
        children: [
            { path: '/echarts', component: echarts, name: '主页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-address-card',
        //leaf: true,//只有一个节点
        children: [
            { path: '/productType', component: ProductType, name: '产品类型' },
            { path: '/product', component: Product, name: '产品管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '营销管理',
        iconCls: 'fa fa-address-card',
        //leaf: true,//只有一个节点
        children: [
            { path: '/activity', component: Activity, name: '营销活动' },
            { path: '/activityRemark', component: ActivityRemark, name: '营销活动备注' },
            { path: '/clue', component: Clue, name: '线索管理' },
            { path: '/clueRemark', component: ClueRemark, name: '线索备注' },
            { path: '/business', component: Business, name: '商机管理' },
            { path: '/j', component: Product, name: '产品管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/order', component: Order, name: '订单管理' },
            { path: '/contract', component: Contract, name: '合同管理' },
            { path: '/orderProduct', component: OrderProduct, name: '订单产品' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '售后管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/customer', component: Customer, name: '客户管理' },
            { path: '/guarantee', component: Guarantee, name: '保修单' },
            { path: '/guaranteeItem', component: GuaranteeItem, name: '保修单明细' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '财务管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/receivables', component: Customer, name: '应收单' },
            { path: '/receivablesItem', component: Guarantee, name: '应收单明细' },
            { path: '/receivablesRemark', component: GuaranteeItem, name: '应收单备注' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/role', component: Table, name: '角色管理'},
            { path: '/menu', component: Table, name: '菜单管理'},
            { path: '/permission', component: Department, name: '权限管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统配置管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/config', component: Config, name: '系统配置' },
            { path: '/dictionary', component: Dictionary, name: '数据字典' },
            { path: '/dictionaryItem', component: DictionaryItem, name: '数据字典明细' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;